{if $admin_request eq 'form_fields'}
<div id="browse-records">
    <div id="tabs">
        <ul>
            <li>
                <a href="#tabs-new">{$lang.$base_request.t_addnew}</a>
            </li>
            <li>
                <a href="#tabs-existing">{$lang.$base_request.t_view}</a>
            </li>
        </ul>
        <div id="tabs-new">
            <div id="new-data">
                {include file="_admin/inc/inc_forms.tpl" fprefix="new"}
            </div><!-- //new-data -->
        </div><!-- //tabs-new -->
        <div id="tabs-existing">
            <table id="table-{$admin_request}" class="display datatable">
                <thead>
                    <tr>
                        {foreach $pv.settings.listing as $item} <th> {$lang.$base_request.$item} </th>
                        {/foreach} <th> {$lang.actions} </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td colspan="3" class="dataTables_empty">Loading data from server</td>
                    </tr>
                </tbody>
            </table>
        </div><!-- //tabs-existing -->
    </div><!-- //tabs -->
</div><!-- //browse-records -->
<div id="edit-record" class="ui-helper-hidden"></div><!-- //edit-record -->
{capture "$admin_request"}

_sid ='{$user.session_id}';

$('#tabs').tabs();
$('#ff_type').val("").trigger("liszt:updated");

{literal}

$('#table-{/literal}{$admin_request}{literal}').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",

"bProcessing": true,
"bServerSide": true,
"sAjaxSource": _urlbegin + '/listing-{/literal}{$admin_request}/' + _urlend + _ajax,

"aoColumns": [
{$pv.settings.listing_js}{literal}
{ "mDataProp": "actions","bSortable": false  }
],
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"global": false,
"dataType": 'json',
"type": "GET",
"url": sSource,
"data": aoData,
"success": fnCallback
});
}
} );

{/literal}

{/capture}

{/if} {* browse *}

{if $admin_request eq 'edit-form_fields'}
<div id="save-data">
    {include file="_admin/inc/inc_forms.tpl" fprefix="save"}
</div>
<script type="text/javascript">
$(function(){ldelim}

{include file="_admin/inc/inc_js_edit.tpl"}

$('#save-ff_type').val("{$pv.data.ff_type}").trigger("liszt:updated");

{if $pv.data.ff_params neq ""}
$('#save-ff_params').closest('li').removeClass('ui-helper-hidden-accessible');
{/if}

{rdelim});</script>
{/if} {* edit *}